`personKsi2` <-
function(rule, data)
{
	ct = contingencyTable(rule, data)
#	cat("ct=", ct, "\n")
#	cat("personKsi2.ksi2(nrc, nr*nc/N)=", personKsi2.ksi2(ct[["nrc"]], ct[["nr"]]*ct[["nc"]]/ct[["N"]]), "\n")
#	cat("personKsi2.ksi2(nr_c, nr*n_c/N)=", personKsi2.ksi2(ct[["nr_c"]], ct[["nr"]]*ct[["n_c"]]/ct[["N"]]), "\n")
#	cat("personKsi2.ksi2(n_rc, n_r*nc/N)=",personKsi2.ksi2(ct[["n_rc"]], ct[["n_r"]]*ct[["nc"]]/ct[["N"]]), "\n")
#	cat("personKsi2.ksi2(n_r_c, n_r*n_c/N)=",personKsi2.ksi2(ct[["n_r_c"]], ct[["n_r"]]*ct[["n_c"]]/ct[["N"]]), "\n")
	return (personKsi2.ksi2(ct[["nrc"]], ct[["nr"]]*ct[["nc"]]/ct[["N"]]) + 
			personKsi2.ksi2(ct[["nr_c"]], ct[["nr"]]*ct[["n_c"]]/ct[["N"]]) + 
			personKsi2.ksi2(ct[["n_rc"]], ct[["n_r"]]*ct[["nc"]]/ct[["N"]]) + 
			personKsi2.ksi2(ct[["n_r_c"]], ct[["n_r"]]*ct[["n_c"]]/ct[["N"]]))
}

